import type { MenuListResult } from '@/api/model/permissionModel';
import { request } from '@/utils/request';

const Api = {
	getRefineryList: '/app/tjylRefinery/list',
	getTjylRefineryOilTypeList: '/app/tjylRefineryOilType/list',
	editOilTypeStock: '/app/tjylRefineryOilType/edit',
	getStockPriceList: '/app/tjylRefineryOilType/getStockPriceList',
	addRefinery: '/app/tjylRefinery/add',
	editRefinery: '/app/tjylRefinery/edit',
	addRefineryOilType: '/app/tjylRefineryOilType/add',
	getRefineryDataById: '/app/tjylRefinery/queryById',
	editRefineryOilType: '/app/tjylRefineryOilType/edit',
	getRefineryOilTypeData: '/app/tjylRefineryOilType/queryById'
};

export function getRefineryList(data) {
	return request.get({
		url: Api.getRefineryList,
		params: data
	});
}

export function getTjylRefineryOilTypeList(data) {
	return request.get({
		url: Api.getTjylRefineryOilTypeList,
		params: data
	});
}

export function editOilTypeStock(data) {
	return request.put({
		url: Api.editOilTypeStock,
		data: data
	});
}

export function getStockPriceList(data) {
	return request.get({
		url: Api.getStockPriceList,
		params: data
	});
}

export function addRefinery(data) {
	return request.post({
		url: Api.addRefinery,
		data: data
	});
}

export function editRefinery(data) {
	return request.put({
		url: Api.editRefinery,
		data: data
	});
}

export function addRefineryOilType(data) {
	return request.post({
		url: Api.addRefineryOilType,
		data: data
	});
}
export function getRefineryDataById(data) {
	return request.get({
		url: Api.getRefineryDataById,
		params: data
	});
}

export function editRefineryOilType(data) {
	return request.put({
		url: Api.editRefineryOilType,
		data: data
	});
}

export function getRefineryOilTypeData(data) {
	return request.get({
		url: Api.getRefineryOilTypeData,
		data: data
	});
}